#ifndef _Control_h
#define _Control_h

#include "CxxUtils.h"
#include "LangUtils.h"

class DoOpControl
{
public: 
	class ds_exec : public _DoOperator
	{
	protected: 
		ds_exec(const ds_exec &);
		ds_exec& operator=(const ds_exec &);
	public: 
		ds_exec() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_if : public _DoOperator
	{
	protected: 
		ds_if(const ds_if &);
		ds_if& operator=(const ds_if &);
	public: 
		ds_if() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_ifelse : public _DoOperator
	{
	protected: 
		ds_ifelse(const ds_ifelse &);
		ds_ifelse& operator=(const ds_ifelse &);
	public: 
		ds_ifelse() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_for : public _DoOperator
	{
	protected: 
		ds_for(const ds_for &);
		ds_for& operator=(const ds_for &);
	public: 
		ds_for() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_repeat : public _DoOperator
	{
	protected: 
		ds_repeat(const ds_repeat &);
		ds_repeat& operator=(const ds_repeat &);
	public: 
		ds_repeat() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_loop : public _DoOperator
	{
	protected: 
		ds_loop(const ds_loop &);
		ds_loop& operator=(const ds_loop &);
	public: 
		ds_loop() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_exit : public _DoOperator
	{
	protected: 
		ds_exit(const ds_exit &);
		ds_exit& operator=(const ds_exit &);
	public: 
		ds_exit() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_stop : public _DoOperator
	{
	protected: 
		ds_stop(const ds_stop &);
		ds_stop& operator=(const ds_stop &);
	public: 
		ds_stop() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_stopped : public _DoOperator
	{
	protected: 
		ds_stopped(const ds_stopped &);
		ds_stopped& operator=(const ds_stopped &);
	public: 
		ds_stopped() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_countexecstack : public _DoOperator
	{
	protected: 
		ds_countexecstack(const ds_countexecstack &);
		ds_countexecstack& operator=(const ds_countexecstack &);
	public: 
		ds_countexecstack() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_quit : public _DoOperator
	{
	protected: 
		ds_quit(const ds_quit &);
		ds_quit& operator=(const ds_quit &);
	public: 
		ds_quit() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_start : public _DoOperator
	{
	protected: 
		ds_start(const ds_start &);
		ds_start& operator=(const ds_start &);
	public: 
		ds_start() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	static void push(_DoDictionaryMultimap& dict) {
		dict.put(CRefPtr< _DoObject >(new DoName("exec")), CRefPtr< _DoObject >(new ds_exec()));
		dict.put(CRefPtr< _DoObject >(new DoName("if")), CRefPtr< _DoObject >(new ds_if()));
		dict.put(CRefPtr< _DoObject >(new DoName("ifelse")), CRefPtr< _DoObject >(new ds_ifelse()));
		dict.put(CRefPtr< _DoObject >(new DoName("for")), CRefPtr< _DoObject >(new ds_for()));
		dict.put(CRefPtr< _DoObject >(new DoName("repeat")), CRefPtr< _DoObject >(new ds_repeat()));
		dict.put(CRefPtr< _DoObject >(new DoName("loop")), CRefPtr< _DoObject >(new ds_loop()));
		dict.put(CRefPtr< _DoObject >(new DoName("exit")), CRefPtr< _DoObject >(new ds_exit()));
		dict.put(CRefPtr< _DoObject >(new DoName("stop")), CRefPtr< _DoObject >(new ds_stop()));
		dict.put(CRefPtr< _DoObject >(new DoName("stopped")), CRefPtr< _DoObject >(new ds_stopped()));
		dict.put(CRefPtr< _DoObject >(new DoName("countexecstack")), CRefPtr< _DoObject >(new ds_countexecstack()));
		dict.put(CRefPtr< _DoObject >(new DoName("quit")), CRefPtr< _DoObject >(new ds_quit()));
		dict.put(CRefPtr< _DoObject >(new DoName("start")), CRefPtr< _DoObject >(new ds_start()));
	}
};

#endif
